package com.sunrise.comunicacao.repositorio;

import java.util.List;

import org.hibernate.Criteria;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Repository;

import com.sunrise.comunicacao.repositorio.iface.RetornoSMSDao;
import com.sunrise.generico.acesso.DaoNegocioService;
import com.sunrise.generico.entidade.RetornoSMS;

@Repository
public class RetornoSMSDaoImpl extends DaoNegocioService<RetornoSMS> implements
		RetornoSMSDao {

	@SuppressWarnings("unchecked")
	public List<RetornoSMS> listarOrdenado() {
		Criteria crit = getSession().createCriteria(RetornoSMS.class);
		crit.addOrder(Order.asc("nome"));
		return crit.list();
	}

	public RetornoSMS getById(Long id) {
		return getById(id, RetornoSMS.class);
	}


}
